# -*- coding: UTF-8 -*-
"""
聊天命令 [调用指令]
By AnpyD
"""

# 导入模块
import bs
import bsInternal
import member
from command import manage

owner_account_id = ["pb-IF4OVEMSDQ=="]

def cmd(msg, clientID):
    account_id = None
    # 获取玩家设备ID
    for i in bsInternal._getForegroundHostActivity().players:
        if i.getInputDevice().getClientID() == clientID:
            account_id = i.get_account_id()

    if account_id == None:
        pass
    else:
        """
        判断指令
        """
        # 判断玩家身份
        if account_id in member.AdminList or account_id in owner_account_id:
            if "#" in msg[0]:
                # 管理命令
                manage.cmd(msg, clientID)

bs.realTimer(5000, bs.Call(bsInternal._setPartyIconAlwaysVisible, True))